Dependency Diagrams
In this lesson, we will look at the diagrammatic representation of functional dependencies.
We'll cover the following
Dependency diagrams#
A dependency diagram illustrates the various dependencies that might exist in a non-normalized table. A non-normalized table is one that has data redundancy in it. This is illustrated below:
As we can observe from the table above, Project_No
and Emp_No
, combined, are the primary key (as the combination of these two attributes can be used to identify each record uniquely).
The following dependencies can be identified from this table:
Partial dependencies:
Project_No
Proj_Name
Reason: Since the name of the project is only dependent upon part of the multi-attribute PK, i.e., Project_No, this results in partial dependency.
Emp_No
Emp_Name
,Dept_No
Reason: Similar to the example above, we see that these two attributes only depend on part of the composite key and not the whole.
Transitive dependency:
Dept_No
Dept_Name
Reason: Since a non-key attribute (Dept_Name
) is dependent on another non-key attribute (Dept_No
), this results in a transitive dependency.
We have highlighted some of the dependencies that exist in this table, but there are many more.
The next lesson will include a short quiz to test your knowledge of functional dependencies.